<!DOCTYPE html>

<link rel="stylesheet" href="../styles.css" />

<style>
  #clip {
    border-width: 10px;
  }

  #floating {
    height: 250px;
  }
</style>

<div id="clip">
  <div id="reference">Ref</div>
  <div id="floating">Float</div>
</div>

<script type="module">
  import {computePosition, shift} from '../dist/index.mjs';
  import {position} from '../utils.mjs';

  computePosition(reference, floating, {
    placement: 'right-end',
    middleware: [shift()],
  }).then(position);
</script>
